package com.xjtu.dto.serviceRecord;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class UpdateServiceDto {
    @Min(value = 1,message = "服务记录格式错误")
    private Integer id;
    @Min(value = 1,message = "老人id应>=1")
    private Integer elderlyId;
    @Min(value = 1,message = "员工id应>= 1")
    private Integer uId;
    @NotBlank(message = "服务不能为空")
    private String serviceName;
    private String remark;
    @NotNull
    @Past
    @JsonFormat(shape = JsonFormat.Shape.STRING , pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime createTime;
}
